package cn.xinfei.xdecision.pulsar.config;


import lombok.Data;

import java.util.List;

@Data
public class XPulsarProducerProperties {
    private List<String> topics;
    //(true) // 开启batch
    private boolean enableBatching = true;
    //(100, TimeUnitprivate String MILLISECONDS) // batch的最大等待时间
    private Integer batchingMaxPublishDelay = 100;
    private boolean useDefault = true;

    // batch的最大大小
    private Integer batchingMaxBytes = 12800;
    // batch中最多保留的消息条数
    private Integer batchingMaxMessages = 10;

    //(MessageRoutingModeprivate String RoundRobinPartition) // Message Routing Mode
    private Integer roundRobinRouterBatchingPartitionSwitchFrequency = 10; // batch开启时，分区切换频率
    private String messageRoutingMode;
    private Integer maxPendingMessages = 50000; // 最大缓存的生成请求数
    private Integer maxPendingMessagesAcrossPartitions = 100000;// 分区topic配置，即所有分区的最大缓存数量
    private boolean blockIfQueueFull = true;//(true) // 当达到最大缓存数时是否block客户端
    private Integer sendTimeout = 5;//(5, TimeUnitprivate String SECONDS) // 发送超时时间
    private String compressionType;//(CompressionTypeprivate String SNAPPY) // 压缩类型
    private String producerName;//("producer-name")
    private boolean enableChunking = true;//(true) // 是否开启Chunking特性


    private String tenant = "public";
    private String namespace = "default";
}
